package cn.csq.rpc.client;

import cn.csq.rpc.Peer;
import cn.csq.rpc.code.Decoder;
import cn.csq.rpc.code.Encoder;
import cn.csq.rpc.transport.HTTPTransportClient;
import cn.csq.rpc.transport.TransportClient;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

/**
 * @author csq
 * @version 1.0.0
 * @ClassName RpcClientConfig.java
 * @Description RpcClient配置
 * @createTime 2021年12月20日 23:13:00
 */
@Data
public class RpcClientConfig {

    private Class<? extends TransportClient> transportClass = HTTPTransportClient.class;
    private Class<? extends Encoder> encoderClass = Encoder.class;
    private Class<? extends Decoder> decoderClass = Decoder.class;
    private Class<? extends TransportSelector> selectorClass = RandomTransportSelector.class;
    private int connectCount = 1;
    private List<Peer> servers = Arrays.asList(new Peer("127.0.0.1", 8080));

}
